package com.woniuxy.service;

import com.woniuxy.controller.form.*;
import com.woniuxy.exception.DdException;
import com.woniuxy.model.PawnBrand;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.utils.Result;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hujianying
 * @since 2022-03-23
 */
public interface PawnBrandService extends IService<PawnBrand> {

    /**
     * 查询所有品牌
     * @param bpf 分页参数
     * @return BrandPageInfo
     */
    Result getAllBrand(BrandPageForm bpf);

    /**
     * 根据品牌名模糊查询
     * @param bpf str
     * @return BrandPageInfo
     */
    Result getBrandByLike(BrandPageForm bpf) throws DdException;

    /**
     * 根据选中的删除
     * @param dbf ischecked
     * @return data为null
     */
    Result deleteBrand(@RequestBody DeleteBrandForm dbf) throws DdException;

    /**
     * 根据brandCode查询
     * @param gobf brandCode
     * @return GetOneBrandInfo
     */
    Result getBrandByCode(GetOneBrandForm gobf);

    /**
     * 修改品牌
     * @param ubf UpdateBrandForm
     * @return data为null
     */
    Result updateBrand(@RequestBody UpdateBrandForm ubf) throws DdException;

    /**
     * 新增品牌
     * @param sbf SaveBrandForm
     * @return data为null
     */
    Result saveBrand(@RequestBody SaveBrandForm sbf) throws DdException;



    /***
     * 根据大类code查询对应的所有品牌
     * @param gbbccf
     * @return
     */
    Result getBrandByCatCode(GetBrandByCatCodeForm gbbccf);

}
